 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<title>新增装修收费登记项目</title>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<link href="${ctx}/styles/public.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/scripts/grid.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<%@ include file="/commons/validation.jsp"%>
<script type="text/javascript">
	function submitForm(){
		var flag = $("registerItemForm").fireEvent("onsubmit");
		if(!flag) return;

		setButtonStatus(false);
		$("mySubmit").click();
	}
	function setButtonStatus(statuz){ //设置按钮状态  true 可用,false不可用
		$("btn1_42").disabled = !statuz;
		$("btn1_22").disabled = !statuz;
		$("btn1_32").disabled = !statuz;
	}
	function init(){
		var options = $("chargeObject").options;
		var count = options.length;
		for(var i = 0 ; i < count; i++){
			options[i].value = options[i].code;
		}
	}
</script>
</head>

<body onload="init();">
<iframe id="showResult" name="showResult" style="display:none" onload="setButtonStatus(true);"></iframe>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg">
    <table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
        	<img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle" />
        	<span class="window_head_intext">登记装修收费项目</span>
        </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td class="content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
      	<form id="registerItemForm" method="post" class="required-validate" target="showResult"
      		action="${ctx}/system_registerItemAction.do?method=add">
      		   <input type="submit" id="mySubmit" style="display:none">
      		   <input type="hidden" id="option" name="option" value="">
        <td class="aux_outtable_color">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
          <tr>
            <td class="aux_intable_td1">交易码：</td>
            <td class="aux_intable_require">
            	<select id="bizKeyword" name="bizKeyword" style="width:195px;" class="select-one-required">
            				<option label="" value="" selected="selected">请选择...</option>
		            	<c:forEach items="${bizCodes}" var="bizCodeItem">
							<option label="${bizCodeItem.description}"
									value="${bizCodeItem.keyword}">
								${bizCodeItem.bizCode}-${bizCodeItem.description}
							</option>
		            	</c:forEach>
            	</select>
              </td>
          </tr>
          <tr>
            <td class="aux_intable_td1">收费项目名称：</td>
            <td class="aux_intable_require">
            	<input name="itemName" type="text" value="" size="32" maxlength="50"
            		class="inputtext validate-char required validate-ajax"
            		validateUrl="${ctx}/system_registerItemAction.do?method=validateItemName"/>
            </td>
          </tr>
          <tr>
            <td class="aux_intable_td1">收费对象：</td>
            <td class="aux_intable_require">
	          	<mypms:Sysrefcode id="chargeObject"
	          					showTip="false"
	          					name="chargeObject"
	          					code="RM_RENOVATE_CHARGE_OBJECT">
	          	</mypms:Sysrefcode>
            </td>
          </tr>
          <tr>
            <td valign="top"  class="aux_intable_td1">计费模式：</td>
            <td class="aux_intable_td2">
				<select id="chargeMode" name="chargeMode" style="width:195px;">
	              <option selected="selected" value="001">按固定金额计费</option>
	              <option value="002">按装修面积计费</option>
	            </select>
            </td>
          </tr>
          <tr>
            <td valign="top"  class="aux_intable_td1">收费标准：</td>
            <td class="aux_intable_require">
            	<input id="price" name="price" type="text" style="text-align:right" value="" size="32"
            		class="inputtext required float-zero-right-5-2 float-right "   />
            </td>
          </tr>
		  <tr>
            <td valign="top"  class="aux_intable_td1">使用状态：</td>
            <td class="aux_intable_td2">
            	<input type="radio" name="state"  value="001" checked="checked"> 在 用&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			    <input type="radio" name="state" value="002">停 用
			</td>
          </tr>
        </table></td>
        </form>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="window_footer"><table border="0" cellspacing="0" cellpadding="0">

	  <tr>
        <td><table border="0" cellpadding="0" cellspacing="0">
          <tr>
		  <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_41"></td>
              <td class="buttonOffMiddle" id="btn1_42"
              	  onClick="$('option').value='saveAndAdd';submitForm();"
              	  onMouseOver="btn_change_over(4)"
              	  onMouseOut="btn_change_out(4)"
              	  onblur="btn_change(4)">

              	  <img src="${ctx}/images/ico_saveandnewfile.gif" alt="" width="14" height="14" border="0" align="absbottom">&nbsp;保存并新增</td>
              <td class="buttonOffRight" id="btn1_43"></td>
            </tr>
        </table></td>
        <td class="btn_between_space"></td>
            <td class="buttonOffLeft" id="btn1_21"></td>
     		<td class="buttonOffMiddle" id="btn1_22"
     			onClick="$('option').value='save';submitForm();"
     			onMouseOver="btn_change_over(2)"
     			onMouseOut="btn_change_out(2)"
     			onBlur="btn_change(2)">

     			<img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 保 存
     		</td>
            <td class="buttonOffRight" id="btn1_23"></td>
              </tr>
          </table></td>
          <td class="btn_between_space"></td>
          <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
                <td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onBlur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 关 闭</td>
                <td class="buttonOffRight" id="btn1_33"></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>